package com.cy.pj.sys.controller;

import com.cy.pj.common.vo.JsonResult;
import com.cy.pj.common.vo.PageObject;
import com.cy.pj.sys.entity.SysLog;
import com.cy.pj.sys.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * The type Sys log controller.
 *
 * @author zimin
 * @create 2019 -07-09 10:25
 */
@Controller
@RequestMapping("/log/")
public class SysLogController {
    @Autowired(required =false)
    private SysLogService sysLogService;

    @RequestMapping("doDeleteObjects")
    public JsonResult doDeleteObjects(Integer... ids) {
        return null;
    }
    /**
     * Do find page objects json result.
     *
     * @param username    the username
     * @param pageCurrent the page current
     * @return the json result
     */
    @RequestMapping(value = "doFindPageObjects")
    @ResponseBody
    public JsonResult doFindPageObjects(String username,Integer pageCurrent) {
        PageObject<SysLog> po = sysLogService.findPageObject(username, pageCurrent);
        return new JsonResult(po);
    }
}
